public class OO2 {
    volatile static boolean run = true;

    public static void main(String[] args) {

        Thread t = new Thread(()->{
           while (run){

           }
        });
        t.start();

        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        run = false;
    }

















    public static int[] srand(int[] a) {
        int[] b = new int[a.length];
        for (int i = 0; i < a.length; i++) {
            int tmp = (int) (Math.random() * (a.length - i));
            b[i] = a[tmp];
            int change = a[a.length - i - 1];
            a[a.length - i - 1] = a[tmp];
            a[tmp] = change;
        }
        return b;
    }
}
